home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / KBD_UTL / TPINKEY / INKEY.DOC < prev    next >
Text File  |  1995-01-19  |  3KB  |  63 lines

  1.  
  2.  
  3.  
  4.                                     Inkey
  5.                 by Peter Zicari, 1992 all rights reserved.
  6.                        Posted to PCOHIO January 1995
  7.  
  8.          
  9.          
  10.          WHAT IT IS
  11.          Inkey is a keyboard function for use with Borland Pascal
  12.          that recognizes key combinations that BP's readkey does not,
  13.          including all 12 function keys and alt-cursor combinations.
  14.          The function returns key code and sets two global variables,
  15.          Functn, which identifies the returned code as a non-letter
  16.          key, and Escape.
  17.          
  18.          HOW TO USE IT
  19.          
  20.          var
  21.          Functn,Escape: Boolean;
  22.          {$F+}
  23.          Function  InKey : char; external;
  24.          {$L Inkey.obj}
  25.          
  26.          
  27.          The two must be declared either in the same unit or as a
  28.          global variable elsewhere, and the function must be declared
  29.          in a unit or used with {F+}
  30.          
  31.          Inkey works by calling BIOS function 10H, which was included
  32.          to support the 101 key keyboard and was not available before
  33.          about 1985. Using this function in your program provides the
  34.          higher function keys and odd key combinations without need
  35.          to load ANSI with the /X parameter.  It recognizes odd
  36.          values returned by some combinations and works around them.
  37.          
  38.          Here is a partial list of the function key codes you can
  39.          use. In the shorthand below, S means shift, C means control
  40.          and A means alt.
  41.          
  42.               F11   - 133        C-down  - 145        A-down - 160
  43.               F12   - 134        C-insert- 146        A-PgDown 161
  44.               S-F11 - 135        C-delete- 147        A-Insert 162
  45.               S-F12 - 136        C-Tab   - 148        A-Delete 163
  46.               C-F11 - 137        C-/     - 149        A-/      164
  47.               C-F12 - 138        C-*     - 150        A-Tab    165
  48.               A-F11 - 139        A-home  - 151        A-enter  166
  49.               A-F12 - 140        A-up    - 152
  50.               C-up arrow - 141   A-PgUp  - 153
  51.               C-hyphen- 142      A-left  - 155
  52.               C-5   - 143        A-right - 157
  53.               C-+   - 144        A-End   - 159
  54.          
  55.          
  56.          DISCLAIMER
  57.          No fee is requested for use of this code, but I accept no
  58.          liability for problems that might arise from your use of it.
  59.          If you find it useful or find a bug and want to comment, you
  60.          can contact me at 
  61.                          peter.zicari@pcohio.com
  62.  
  63.